using System;
using System.Windows.Forms;

namespace VSSDKAssist.Recipes.Common.Editors.Grid
{
    /// <summary/>
    public class AutomaticBindingStrategy : IBindingStrategy
    {
        /// <summary>
        /// Gets the bound item.
        /// </summary>
        /// <param name="gridRow">The grid row.</param>
        /// <returns></returns>
        public object GetBoundItem(DataGridViewRow gridRow)
        {
            if(gridRow == null)
                throw new ArgumentNullException("gridRow");

            return gridRow.DataBoundItem;
        }
    }
}